﻿using Fabrication.Tests.TestClasses;
using NUnit.Framework;

namespace Fabrication.Tests
{
    [TestFixture]
    public class struct_properties
    {
        [Test]
        public void should_create_custom_value_type_properties()
        {
            var builtItem = new FabricationScope().Generate<SinglePropertyClass<CustomStruct>>();

            Assert.That(builtItem.Value, Is.Not.Null);
        }

        [Test]
        public void should_populate_custom_value_type_properties()
        {
            var builtItem = new FabricationScope().Generate<SinglePropertyClass<CustomStruct>>();

            Assert.That(builtItem.Value.Number, Is.EqualTo(0));
        }

        [Test]
        public void should_populate_unknown_bcl_value_type_properties()
        {
            var builtItem = new FabricationScope().Generate<SinglePropertyClass<ushort>>();

            Assert.That(builtItem.Value, Is.EqualTo((ushort)0));
        }
    }
}
